mod my {
    pub struct Rectangle {
        width: u32,
        height: u32,
    }

    impl Rectangle {
        pub fn new(width: u32, height: u32) -> Rectangle {
            Rectangle { width, height }
        }

        pub fn area(&self) -> u32 {
            self.width * self.height
        }

        pub fn set_width(&mut self, width: u32) {
            self.width = width;
        }

        pub fn width(&self) -> u32 {
            self.width
        }

        pub fn height(&self) -> u32 {
            self.height
        }
    }
}

fn main() {
    let mut rect1 = my::Rectangle::new(10, 20);
    println!("rect1.area: {} * {} = {}", rect1.width(), rect1.height(), rect1.area());

    rect1.set_width(10);
    println!("rect1.area: {} * {} = {}", rect1.width(), rect1.height(), rect1.area());
}
